package com.shiwu.entity;


import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;

/**
 * @author Lelezhang
 * @create 2020-02-10 13:27
 */
@Entity //声明本类是一个实体,告诉jpa框架本类是与数据库表对应的类
@Table(name="user")
public class User {
    @Id //标识是主键
    @Column(length = 50)//数据库对应字段 字段长度
    private String id;
    private String money;

    @Override
    public String toString() {
        return "User{" +
                "id='" + id + '\'' +
                ", money='" + money + '\'' +
                '}';
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getMoney() {
        return money;
    }

    public void setMoney(String money) {
        this.money = money;
    }

    public User() {
    }

    public User(String id, String money) {
        this.id = id;
        this.money = money;
    }
}
